/**
 * 
 */
package com.xinnet.mms.enums;


/**
 * 购物车商品枚举
 * @author 王湛智
 * @author $Author:$
 * @version $Revision:$ $Date:$ 
 * @since 2014-6-5
 * 
 */
public enum ShopCartGoodsTypeEnmu {
	
	ShopCartGoodsType_1(1,"购买域名"),
	ShopCartGoodsType_2(2,"续费域名"),
	ShopCartGoodsType_3(3,"转入域名"),
	ShopCartGoodsType_4(4,"购买邮局"),
	ShopCartGoodsType_5(5,"购买邮局附属"),
	ShopCartGoodsType_6(6,"续费邮局"),
	ShopCartGoodsType_7(7,"升级邮局"),
	ShopCartGoodsType_8(8,"购买虚机"),
	ShopCartGoodsType_9(9,"购买虚机附属"),
	ShopCartGoodsType_10(10,"续费虚机"),
	ShopCartGoodsType_11(11,"升级虚机"),
	ShopCartGoodsType_12(12,"购买套餐"),
	ShopCartGoodsType_13(13,"云主机"),
	ShopCartGoodsType_14(14,"主机租用购买"),
	ShopCartGoodsType_15(15,"通用网址购买"),
	ShopCartGoodsType_16(16,"通用网址续费"),
	ShopCartGoodsType_17(17,"转入通用网址"),
	ShopCartGoodsType_18(18,"购买姓名域名"),
	ShopCartGoodsType_19(19,"购买一口价域名"),
	ShopCartGoodsType_20(20,"域名优先注册"),
	ShopCartGoodsType_21(21,"域名优先升级"),
	ShopCartGoodsType_22(22,"VPS续费"),
	ShopCartGoodsType_23(23,"VPS升级"),
	ShopCartGoodsType_24(24,"优先升级特殊渠道"),
	ShopCartGoodsType_25(25,"VPS购买附属"),
	ShopCartGoodsType_26(26,"购买云邮产品"),
	ShopCartGoodsType_27(27,"域名购买附属"),
	ShopCartGoodsType_28(28,"特价机购买"),
	ShopCartGoodsType_29(29,"购买主机托管"),
	ShopCartGoodsType_30(30,"购买主机租用"),
	ShopCartGoodsType_31(31,"续费域名附属"),
	ShopCartGoodsType_32(32,"me建站购买"),
	ShopCartGoodsType_33(33,"me建站续费"),
	ShopCartGoodsType_34(34,"云主机服务续费"),
	ShopCartGoodsType_35(35,"服务购买"),
	ShopCartGoodsType_36(36,"VPS"),
	ShopCartGoodsType_37(37,"ec");
	private Integer value;
	
	private String label;
	
	private ShopCartGoodsTypeEnmu(Integer value, String label){
		this.value = value;
		this.label = label;
	}
	
	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}
	
	
	/**
	 * 根据value获取对应的枚举
	 * @param value
	 * @return
	 */
	public static ShopCartGoodsTypeEnmu getCustomerStateEnmuByValue(Integer value){
		ShopCartGoodsTypeEnmu[] custEnums = ShopCartGoodsTypeEnmu.values();
		for (ShopCartGoodsTypeEnmu allotTypeEnmu : custEnums) {
			if(allotTypeEnmu.getValue() == value){
				return allotTypeEnmu;
			}
		}
		return null;
	}
}
